<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Dhara: include/main.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Dhara
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">main.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;mpi.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;sys/stat.h&gt;</code><br />
<code>#include &lt;sys/types.h&gt;</code><br />
<code>#include &lt;cuda.h&gt;</code><br />
<code>#include &lt;cuda_runtime.h&gt;</code><br />
<code>#include &lt;netcdf.h&gt;</code><br />
<code>#include &lt;Eigen/Dense&gt;</code><br />
<code>#include &quot;<a class="el" href="class_8h_source.html">class.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="vertclass_8h_source.html">vertclass.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="saveclass_8h_source.html">saveclass.h</a>&quot;</code><br />
</div>
<p><a href="main_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a30c87e11fd7fecbcda306bb0b73ef320"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a30c87e11fd7fecbcda306bb0b73ef320">MPI_MASTER_RANK</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a30c87e11fd7fecbcda306bb0b73ef320"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a367a96ad20ec8de41dfed50904b0a07c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a367a96ad20ec8de41dfed50904b0a07c">NUM_SOIL_LAYERS</a>&#160;&#160;&#160;15</td></tr>
<tr class="separator:a367a96ad20ec8de41dfed50904b0a07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae4d4529829bf9cdd8b2812ff70ec542"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aae4d4529829bf9cdd8b2812ff70ec542">PRINT_NEIGHBORS</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:aae4d4529829bf9cdd8b2812ff70ec542"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11a25bf4c5f5a9c787764b5fb052d367"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a11a25bf4c5f5a9c787764b5fb052d367">PRINT_TOPOLOGY</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a11a25bf4c5f5a9c787764b5fb052d367"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15d6adf66aaac47296377a40dd721966"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a15d6adf66aaac47296377a40dd721966">PRINT_INITIALDATA</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a15d6adf66aaac47296377a40dd721966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad733c449d4055fd00765183476566700"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#ad733c449d4055fd00765183476566700">PRINT_RESULTS</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ad733c449d4055fd00765183476566700"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab31de9bfdd44a250d67ecc8cd2cc06fd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#ab31de9bfdd44a250d67ecc8cd2cc06fd">DIR_TOP</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ab31de9bfdd44a250d67ecc8cd2cc06fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ae9767b23edf40871541d23962784b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a85ae9767b23edf40871541d23962784b">DIR_RIGHT</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a85ae9767b23edf40871541d23962784b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8116fa3b84c06c2419683806a072321"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aa8116fa3b84c06c2419683806a072321">DIR_BOTTOM</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:aa8116fa3b84c06c2419683806a072321"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a788d3497514ea05602fd974d7bdcdbde"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a788d3497514ea05602fd974d7bdcdbde">DIR_LEFT</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:a788d3497514ea05602fd974d7bdcdbde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2403320c41f08e7567cb169de5db66b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a2403320c41f08e7567cb169de5db66b3">STATUS_OK</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a2403320c41f08e7567cb169de5db66b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23205a6a97096d57a247794f5e250963"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a23205a6a97096d57a247794f5e250963">STATUS_ERR</a>&#160;&#160;&#160;-1</td></tr>
<tr class="separator:a23205a6a97096d57a247794f5e250963"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a030738838149f080d79d8ab81cc5e74d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a030738838149f080d79d8ab81cc5e74d">pinum</a>&#160;&#160;&#160;3.1415926535897932384626433832795028841971693993751058209749445923</td></tr>
<tr class="separator:a030738838149f080d79d8ab81cc5e74d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bfff1124eee0869b4d7f81837b9c9aa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a8bfff1124eee0869b4d7f81837b9c9aa">Jmax_Bisec</a>&#160;&#160;&#160;100</td></tr>
<tr class="separator:a8bfff1124eee0869b4d7f81837b9c9aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4576165ce647221dc94903a244cd93c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#af4576165ce647221dc94903a244cd93c">cudaCheckError</a>(msg)</td></tr>
<tr class="separator:af4576165ce647221dc94903a244cd93c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afecf1c2ac44bffaacd9dc7b5f83a0c97"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#afecf1c2ac44bffaacd9dc7b5f83a0c97">SafeCudaCall</a>(call)                &#160;&#160;&#160;<a class="el" href="main_8h.html#a87c5ce86d74764a06a13b73dff013870">CheckCudaCall</a>(call, #call, __FILE__, __LINE__)</td></tr>
<tr class="separator:afecf1c2ac44bffaacd9dc7b5f83a0c97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84f5dcf6c178909ae55cf2b9cda92f20"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a84f5dcf6c178909ae55cf2b9cda92f20">SafeHostFree</a>(block)              &#160;&#160;&#160;{ if (block) free(block); }</td></tr>
<tr class="separator:a84f5dcf6c178909ae55cf2b9cda92f20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea018f545c7be490c24d661735e86bd7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aea018f545c7be490c24d661735e86bd7">SafeDevFree</a>(block)                &#160;&#160;&#160;{ if (block) <a class="el" href="main_8h.html#afecf1c2ac44bffaacd9dc7b5f83a0c97">SafeCudaCall</a>(cudaFree(block)); }</td></tr>
<tr class="separator:aea018f545c7be490c24d661735e86bd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a860ca7f6ec845b64d0103e09ebf5260a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a860ca7f6ec845b64d0103e09ebf5260a">OnePrintf</a>(allow, ...)          &#160;&#160;&#160;{ if (allow) printf(__VA_ARGS__); }</td></tr>
<tr class="separator:a860ca7f6ec845b64d0103e09ebf5260a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe205acf716cef1ddae916a653356bdf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#afe205acf716cef1ddae916a653356bdf">OneErrPrintf</a>(allow, ...)    &#160;&#160;&#160;{ if (allow) fprintf(stderr, __VA_ARGS__); }</td></tr>
<tr class="separator:afe205acf716cef1ddae916a653356bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b1ecd085bfbe6b1aa903940060d2050"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a0b1ecd085bfbe6b1aa903940060d2050">HasNeighbor</a>(neighbors,  dir)&#160;&#160;&#160;(neighbors[dir] != MPI_PROC_NULL)</td></tr>
<tr class="separator:a0b1ecd085bfbe6b1aa903940060d2050"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad39af27454ac575592b323e38d94c264"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#ad39af27454ac575592b323e38d94c264">BSZ</a>&#160;&#160;&#160;256</td></tr>
<tr class="separator:ad39af27454ac575592b323e38d94c264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a1880a5118efea1a49ec4f07d1e2d74"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a3a1880a5118efea1a49ec4f07d1e2d74">TSZ</a>&#160;&#160;&#160;256</td></tr>
<tr class="separator:a3a1880a5118efea1a49ec4f07d1e2d74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4a19481ecee412fb5ec4fd04c90adb5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a4a19481ecee412fb5ec4fd04c90adb5d">InitializeMPI</a> (int *argc, char ***argv, int *rank, int *procsize)</td></tr>
<tr class="memdesc:a4a19481ecee412fb5ec4fd04c90adb5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize MPI processes.  <a href="#a4a19481ecee412fb5ec4fd04c90adb5d">More...</a><br /></td></tr>
<tr class="separator:a4a19481ecee412fb5ec4fd04c90adb5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24594871c51ae6b8ca2d6a8c7794d6b8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a24594871c51ae6b8ca2d6a8c7794d6b8">FinalizeMPI</a> (int rank, int procsize, <a class="el" href="classmpi_class.html">mpiClass</a> *mpiobj)</td></tr>
<tr class="memdesc:a24594871c51ae6b8ca2d6a8c7794d6b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">: Close (finalize) the MPI environment  <a href="#a24594871c51ae6b8ca2d6a8c7794d6b8">More...</a><br /></td></tr>
<tr class="separator:a24594871c51ae6b8ca2d6a8c7794d6b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0565c33ed351121f9cbd7bf1ddfbec8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#ad0565c33ed351121f9cbd7bf1ddfbec8">SetTopologyNetwork</a> (int rank, int procsize, <a class="el" href="class_project_class.html">ProjectClass</a> *&amp;project, <a class="el" href="classmpi_class.html">mpiClass</a> *&amp;mpiobj)</td></tr>
<tr class="memdesc:ad0565c33ed351121f9cbd7bf1ddfbec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set up topolgy network (domain decomposition) and obtained neighbors. The size of topology must be matched with the size of MPI processes used.  <a href="#ad0565c33ed351121f9cbd7bf1ddfbec8">More...</a><br /></td></tr>
<tr class="separator:ad0565c33ed351121f9cbd7bf1ddfbec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d43bf4e37ab8cd5eebd603b72ea5f9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aa5d43bf4e37ab8cd5eebd603b72ea5f9">ParsingCommandsAndConfigurations</a> (int argc, char **argv, const char *&amp;file_config, int rank, int procsize, <a class="el" href="class_project_class.html">ProjectClass</a> *&amp;project, <a class="el" href="class_file_name_class.html">FileNameClass</a> *&amp;files, <a class="el" href="classmpi_class.html">mpiClass</a> *&amp;mpiobj)</td></tr>
<tr class="memdesc:aa5d43bf4e37ab8cd5eebd603b72ea5f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse command line arguments and read configuration file.  <a href="#aa5d43bf4e37ab8cd5eebd603b72ea5f9">More...</a><br /></td></tr>
<tr class="separator:aa5d43bf4e37ab8cd5eebd603b72ea5f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fb8e2a162c61a792a4f6784ae7ceae2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a1fb8e2a162c61a792a4f6784ae7ceae2">LoadConfigMLCanModel</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_switch_class.html">SwitchClass</a> *switches, <a class="el" href="class_constant_class.html">ConstantClass</a> *constants, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_radiation_class.html">RadiationClass</a> *radiation, <a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *photosynthesis, <a class="el" href="class_respiration_class.html">RespirationClass</a> *respiration, <a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *stomaconduct, <a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *microenviron)</td></tr>
<tr class="memdesc:a1fb8e2a162c61a792a4f6784ae7ceae2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads user configurations to MLCanmodel.  <a href="#a1fb8e2a162c61a792a4f6784ae7ceae2">More...</a><br /></td></tr>
<tr class="separator:a1fb8e2a162c61a792a4f6784ae7ceae2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4e7123ba69ff3d9bbd373c5f9611b3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#ae4e7123ba69ff3d9bbd373c5f9611b3e">LoadCanopyRootDistributions</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *vertcanopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *vertsoils)</td></tr>
<tr class="memdesc:ae4e7123ba69ff3d9bbd373c5f9611b3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load canopy and root distribution from text files specified in configuration file. If more than one vegetation, distributions for each species must be provided.  <a href="#ae4e7123ba69ff3d9bbd373c5f9611b3e">More...</a><br /></td></tr>
<tr class="separator:ae4e7123ba69ff3d9bbd373c5f9611b3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d0bb17a56ea141fe870e514ef122f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a60d0bb17a56ea141fe870e514ef122f0">LoadForcingData</a> (<a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, int rank, int procsize, int num_steps)</td></tr>
<tr class="memdesc:a60d0bb17a56ea141fe870e514ef122f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">load forcing data from NetCDF file.  <a href="#a60d0bb17a56ea141fe870e514ef122f0">More...</a><br /></td></tr>
<tr class="separator:a60d0bb17a56ea141fe870e514ef122f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d1be3f7a08fb71cc9a747e8bc9c597"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a94d1be3f7a08fb71cc9a747e8bc9c597">LoadFlowModelConfig</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface)</td></tr>
<tr class="memdesc:a94d1be3f7a08fb71cc9a747e8bc9c597"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads user configurations to flow model.  <a href="#a94d1be3f7a08fb71cc9a747e8bc9c597">More...</a><br /></td></tr>
<tr class="separator:a94d1be3f7a08fb71cc9a747e8bc9c597"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa916afa39225dd0fa219a35bef364027"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aa916afa39225dd0fa219a35bef364027">LoadTopography</a> (<a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland, int rank, int procsize)</td></tr>
<tr class="memdesc:aa916afa39225dd0fa219a35bef364027"><td class="mdescLeft">&#160;</td><td class="mdescRight">To load topography info from NetCDF file. Topography is only used for flow modling in GPU device through master process.  <a href="#aa916afa39225dd0fa219a35bef364027">More...</a><br /></td></tr>
<tr class="separator:aa916afa39225dd0fa219a35bef364027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a582f178161d87441eb604256d4da3d17"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a582f178161d87441eb604256d4da3d17">GetFileInfo</a> (const char *file_name, const char *var_name, int ndims, int *dim)</td></tr>
<tr class="memdesc:a582f178161d87441eb604256d4da3d17"><td class="mdescLeft">&#160;</td><td class="mdescRight">To extract information and dimension of NetCDF files.  <a href="#a582f178161d87441eb604256d4da3d17">More...</a><br /></td></tr>
<tr class="separator:a582f178161d87441eb604256d4da3d17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01482c18a453883899e7979fc631d459"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a01482c18a453883899e7979fc631d459">SetFlowModelConditions</a> (<a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;subsurface, int num_steps, int rank, int procsize, int3 globsize)</td></tr>
<tr class="memdesc:a01482c18a453883899e7979fc631d459"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set conditions in host memory.  <a href="#a01482c18a453883899e7979fc631d459">More...</a><br /></td></tr>
<tr class="separator:a01482c18a453883899e7979fc631d459"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98590f5891351f22d8c51d213bf483a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a98590f5891351f22d8c51d213bf483a7">SetMPIGPUMapping</a> (<a class="el" href="classmpi_class.html">mpiClass</a> *mpiobj, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;subsurface, int procsize, int3 globsize, int2 topolsize)</td></tr>
<tr class="memdesc:a98590f5891351f22d8c51d213bf483a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the MPI map used for flow model in GPU.  <a href="#a98590f5891351f22d8c51d213bf483a7">More...</a><br /></td></tr>
<tr class="separator:a98590f5891351f22d8c51d213bf483a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb3f68180a7899c43e060d4d4e091038"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#afb3f68180a7899c43e060d4d4e091038">GatherRootDensityToMasterAndFilter</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *vertsoils, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_host, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_dev, int rank, int procsize, MPI_Comm *cartComm)</td></tr>
<tr class="memdesc:afb3f68180a7899c43e060d4d4e091038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Collect root density profile from all processes to master.  <a href="#afb3f68180a7899c43e060d4d4e091038">More...</a><br /></td></tr>
<tr class="separator:afb3f68180a7899c43e060d4d4e091038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa897f1b92b864e62d9e2d061b84d9524"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#aa897f1b92b864e62d9e2d061b84d9524">NumericalModelKernels</a> (int rank, int procsize, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="classmpi_class.html">mpiClass</a> *mpiobj)</td></tr>
<tr class="memdesc:aa897f1b92b864e62d9e2d061b84d9524"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main kernels calling numerical models including MLCan and Flow3D model. While MLCan is implemented in all MPI processes in host, Flow3D model is run in GPU device controlled by the Master process. Communications between MPI and GPU for link MLCan and Flow3D is executed in Master process only. Simulations in other MPI processes are gatherred/scatterred to mMaster process every time step for communicating with GPU device.  <a href="#aa897f1b92b864e62d9e2d061b84d9524">More...</a><br /></td></tr>
<tr class="separator:aa897f1b92b864e62d9e2d061b84d9524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87c5ce86d74764a06a13b73dff013870"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a87c5ce86d74764a06a13b73dff013870">CheckCudaCall</a> (cudaError_t command, const char *commandName, const char *fileName, int line)</td></tr>
<tr class="separator:a87c5ce86d74764a06a13b73dff013870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7e2e49efca5ebd09279daeef8dac513"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#af7e2e49efca5ebd09279daeef8dac513">PreRunningFlowModel</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;subsurface_dev, int rank, int procsize, int3 globsize, MPI_Comm *cartComm)</td></tr>
<tr class="separator:af7e2e49efca5ebd09279daeef8dac513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06ccda7e927aad51714c254e703c7342"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a06ccda7e927aad51714c254e703c7342">SaveModelResults</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_host, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_dev, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_host, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_dev, int3 globsize, int t)</td></tr>
<tr class="memdesc:a06ccda7e927aad51714c254e703c7342"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy to host and save 2D and 3D results to netcdf.  <a href="#a06ccda7e927aad51714c254e703c7342">More...</a><br /></td></tr>
<tr class="separator:a06ccda7e927aad51714c254e703c7342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35c9d3d3dc374ced7d701074e0b3b414"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a35c9d3d3dc374ced7d701074e0b3b414">RunCoupledFlowModel</a> (<a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_host, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_dev, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_host, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_dev, <a class="el" href="class_file_name_class.html">FileNameClass</a> *files, <a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_forcing_class.html">ForcingClass</a> *&amp;forcings, <a class="el" href="class_switch_class.html">SwitchClass</a> *switches, <a class="el" href="class_constant_class.html">ConstantClass</a> *constants, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_soil_class.html">SoilClass</a> *soils, <a class="el" href="class_radiation_class.html">RadiationClass</a> *radiation, <a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *photosynthesis, <a class="el" href="class_respiration_class.html">RespirationClass</a> *respiration, <a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *stomaconduct, <a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *microenviron, <a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *vertcanopies, <a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *vertsoils, <a class="el" href="class_eigen_canopy_class.html">EigenCanopyClass</a> *eigencanopies, <a class="el" href="class_eigen_soil_class.html">EigenSoilClass</a> *eigensoils, <a class="el" href="class_output_class.html">OutputClass</a> *outmlcan, int rank, int procsize, int3 globsize, int3 domsize, int2 topolsize, int2 topolindex, MPI_Comm *cartComm)</td></tr>
<tr class="separator:a35c9d3d3dc374ced7d701074e0b3b414"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a762a56db325b0a56ade192fef8bb55b7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a762a56db325b0a56ade192fef8bb55b7">CopyDataToDevice</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *timeforcings, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_host, <a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *overland_dev, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_host, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_dev, int3 globsize)</td></tr>
<tr class="separator:a762a56db325b0a56ade192fef8bb55b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a106808d5ba55a54cef12059a6af7f2cc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8h.html#a106808d5ba55a54cef12059a6af7f2cc">SaveResultEntirePeriod</a> (<a class="el" href="class_project_class.html">ProjectClass</a> *project, <a class="el" href="class_canopy_class.html">CanopyClass</a> *canopies, <a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *subsurface_host, <a class="el" href="class_output_class.html">OutputClass</a> *outmlcan, int rank, int procsize, int3 globsize, MPI_Comm *cartComm)</td></tr>
<tr class="memdesc:a106808d5ba55a54cef12059a6af7f2cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save mean results for entire simulation period.  <a href="#a106808d5ba55a54cef12059a6af7f2cc">More...</a><br /></td></tr>
<tr class="separator:a106808d5ba55a54cef12059a6af7f2cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ad39af27454ac575592b323e38d94c264"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BSZ&#160;&#160;&#160;256</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af4576165ce647221dc94903a244cd93c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define cudaCheckError</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">msg</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div><div class="line">        cudaError_t __err = cudaGetLastError(); \</div><div class="line">        if (__err != cudaSuccess) { \</div><div class="line">            fprintf(stderr, <span class="stringliteral">&quot;Fatal error: %s (%s at %s:%d)\n&quot;</span>, \</div><div class="line">                            msg, cudaGetErrorString(__err), \</div><div class="line">                            __FILE__, __LINE__); \</div><div class="line">            fprintf(stderr, <span class="stringliteral">&quot;*** FAILED - ABORTING\n&quot;</span>); \</div><div class="line">            exit(1); \</div><div class="line">        } \</div><div class="line">      } <span class="keywordflow">while</span> (0)</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa8116fa3b84c06c2419683806a072321"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIR_BOTTOM&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a788d3497514ea05602fd974d7bdcdbde"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIR_LEFT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a85ae9767b23edf40871541d23962784b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIR_RIGHT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ab31de9bfdd44a250d67ecc8cd2cc06fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIR_TOP&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a0b1ecd085bfbe6b1aa903940060d2050"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HasNeighbor</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">neighbors, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dir&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(neighbors[dir] != MPI_PROC_NULL)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a8bfff1124eee0869b4d7f81837b9c9aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Jmax_Bisec&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a30c87e11fd7fecbcda306bb0b73ef320"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MPI_MASTER_RANK&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a367a96ad20ec8de41dfed50904b0a07c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NUM_SOIL_LAYERS&#160;&#160;&#160;15</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afe205acf716cef1ddae916a653356bdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define OneErrPrintf</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">allow, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;{ if (allow) fprintf(stderr, __VA_ARGS__); }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a860ca7f6ec845b64d0103e09ebf5260a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define OnePrintf</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">allow, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;{ if (allow) printf(__VA_ARGS__); }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a030738838149f080d79d8ab81cc5e74d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define pinum&#160;&#160;&#160;3.1415926535897932384626433832795028841971693993751058209749445923</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a15d6adf66aaac47296377a40dd721966"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PRINT_INITIALDATA&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aae4d4529829bf9cdd8b2812ff70ec542"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PRINT_NEIGHBORS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ad733c449d4055fd00765183476566700"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PRINT_RESULTS&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a11a25bf4c5f5a9c787764b5fb052d367"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PRINT_TOPOLOGY&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afecf1c2ac44bffaacd9dc7b5f83a0c97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SafeCudaCall</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">call</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="main_8h.html#a87c5ce86d74764a06a13b73dff013870">CheckCudaCall</a>(call, #call, __FILE__, __LINE__)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aea018f545c7be490c24d661735e86bd7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SafeDevFree</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">block</td><td>)</td>
          <td>&#160;&#160;&#160;{ if (block) <a class="el" href="main_8h.html#afecf1c2ac44bffaacd9dc7b5f83a0c97">SafeCudaCall</a>(cudaFree(block)); }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a84f5dcf6c178909ae55cf2b9cda92f20"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SafeHostFree</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">block</td><td>)</td>
          <td>&#160;&#160;&#160;{ if (block) free(block); }</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a23205a6a97096d57a247794f5e250963"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATUS_ERR&#160;&#160;&#160;-1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2403320c41f08e7567cb169de5db66b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATUS_OK&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a3a1880a5118efea1a49ec4f07d1e2d74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TSZ&#160;&#160;&#160;256</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a87c5ce86d74764a06a13b73dff013870"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CheckCudaCall </td>
          <td>(</td>
          <td class="paramtype">cudaError_t&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>commandName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a762a56db325b0a56ade192fef8bb55b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CopyDataToDevice </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a24594871c51ae6b8ca2d6a8c7794d6b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FinalizeMPI </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&#160;</td>
          <td class="paramname"><em>mpiobj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>: Close (finalize) the MPI environment </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>The global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>The total number of MPI processes available </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">mpiobj</td><td>message passing interface object class </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afb3f68180a7899c43e060d4d4e091038"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GatherRootDensityToMasterAndFilter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *&#160;</td>
          <td class="paramname"><em>vertsoils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MPI_Comm *&#160;</td>
          <td class="paramname"><em>cartComm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Collect root density profile from all processes to master. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">vertsoils</td><td>Class including vertical soil info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">soils</td><td>Class including soil variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_host</td><td>Subsurface flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_dev</td><td>Subsurface flow class in device memory </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">cartComm</td><td>Carthesian MPI communicator </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a582f178161d87441eb604256d4da3d17"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GetFileInfo </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>file_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>var_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>dim</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To extract information and dimension of NetCDF files. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file_name</td><td>NetCDF file </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">var_name</td><td>Variable inspecting </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ndims</td><td>Number of dimension of the vars </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">dim</td><td>Dimension of the vars </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4a19481ecee412fb5ec4fd04c90adb5d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InitializeMPI </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>procsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize MPI processes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argc</td><td>The number of command-line arguments </td></tr>
    <tr><td class="paramname">argv</td><td>The list of command-line arguments </td></tr>
    <tr><td class="paramname">rank</td><td>The global rank of the current MPI process </td></tr>
    <tr><td class="paramname">size</td><td>The total number of MPI processes available </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae4e7123ba69ff3d9bbd373c5f9611b3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoadCanopyRootDistributions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *&#160;</td>
          <td class="paramname"><em>vertcanopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *&#160;</td>
          <td class="paramname"><em>vertsoils</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load canopy and root distribution from text files specified in configuration file. If more than one vegetation, distributions for each species must be provided. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">canopies</td><td>Class including variables in canopy </td></tr>
    <tr><td class="paramname">vertcanopies</td><td>Canopy classes including vertical variables </td></tr>
    <tr><td class="paramname">soils</td><td>Class including variables in soil </td></tr>
    <tr><td class="paramname">vertsoils</td><td>Soil classes including vertical variables </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1fb8e2a162c61a792a4f6784ae7ceae2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoadConfigMLCanModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_switch_class.html">SwitchClass</a> *&#160;</td>
          <td class="paramname"><em>switches</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_constant_class.html">ConstantClass</a> *&#160;</td>
          <td class="paramname"><em>constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_radiation_class.html">RadiationClass</a> *&#160;</td>
          <td class="paramname"><em>radiation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *&#160;</td>
          <td class="paramname"><em>photosynthesis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_respiration_class.html">RespirationClass</a> *&#160;</td>
          <td class="paramname"><em>respiration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *&#160;</td>
          <td class="paramname"><em>stomaconduct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *&#160;</td>
          <td class="paramname"><em>microenviron</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads user configurations to MLCanmodel. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramname">files</td><td>Class including filename info </td></tr>
    <tr><td class="paramname">switches</td><td>Class including switch info </td></tr>
    <tr><td class="paramname">constants</td><td>Class including constant info </td></tr>
    <tr><td class="paramname">canopies</td><td>Class including canopy variables </td></tr>
    <tr><td class="paramname">soils</td><td>Class including soil variables </td></tr>
    <tr><td class="paramname">radiation</td><td>Class including radiation variables </td></tr>
    <tr><td class="paramname">photosynthesis</td><td>Class including photosynthesis variables </td></tr>
    <tr><td class="paramname">respiration</td><td>Class including respiration variables </td></tr>
    <tr><td class="paramname">stomaconduct</td><td>Class including stomaconductance variables </td></tr>
    <tr><td class="paramname">microenviron</td><td>Class including microenrivonment variables </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a94d1be3f7a08fb71cc9a747e8bc9c597"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoadFlowModelConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads user configurations to flow model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramname">files</td><td>Class including filename info </td></tr>
    <tr><td class="paramname">overland</td><td>Overland flow class </td></tr>
    <tr><td class="paramname">subsurface</td><td>Subsurface flow class </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a60d0bb17a56ea141fe870e514ef122f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoadForcingData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_steps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>load forcing data from NetCDF file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">files</td><td>NetCDF file </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">canopies</td><td>The canopies </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeforcings</td><td>Forcings time class </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_steps</td><td>The number of timesteps </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa916afa39225dd0fa219a35bef364027"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LoadTopography </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To load topography info from NetCDF file. Topography is only used for flow modling in GPU device through master process. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">files</td><td>NetCDF file </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland</td><td>Overland flow class </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa897f1b92b864e62d9e2d061b84d9524"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NumericalModelKernels </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&#160;</td>
          <td class="paramname"><em>mpiobj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main kernels calling numerical models including MLCan and Flow3D model. While MLCan is implemented in all MPI processes in host, Flow3D model is run in GPU device controlled by the Master process. Communications between MPI and GPU for link MLCan and Flow3D is executed in Master process only. Simulations in other MPI processes are gatherred/scatterred to mMaster process every time step for communicating with GPU device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">files</td><td>Number of time steps for simulation </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Filename for loading data </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">mpiobj</td><td>The message passing interface objects </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa5d43bf4e37ab8cd5eebd603b72ea5f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ParsingCommandsAndConfigurations </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&amp;&#160;</td>
          <td class="paramname"><em>file_config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>mpiobj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parse command line arguments and read configuration file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The total number of MPI processes available </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">globsize</td><td>Size of the entire domain </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">domsize</td><td>Size of local domain in each MPI </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">topolsize</td><td>The desired topology size of MPI </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af7e2e49efca5ebd09279daeef8dac513"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreRunningFlowModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MPI_Comm *&#160;</td>
          <td class="paramname"><em>cartComm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a35c9d3d3dc374ced7d701074e0b3b414"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RunCoupledFlowModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_forcing_class.html">ForcingClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>forcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_switch_class.html">SwitchClass</a> *&#160;</td>
          <td class="paramname"><em>switches</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_constant_class.html">ConstantClass</a> *&#160;</td>
          <td class="paramname"><em>constants</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_soil_class.html">SoilClass</a> *&#160;</td>
          <td class="paramname"><em>soils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_radiation_class.html">RadiationClass</a> *&#160;</td>
          <td class="paramname"><em>radiation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_photosynthesis_class.html">PhotosynthesisClass</a> *&#160;</td>
          <td class="paramname"><em>photosynthesis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_respiration_class.html">RespirationClass</a> *&#160;</td>
          <td class="paramname"><em>respiration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_stoma_conduct_class.html">StomaConductClass</a> *&#160;</td>
          <td class="paramname"><em>stomaconduct</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_micro_environment_class.html">MicroEnvironmentClass</a> *&#160;</td>
          <td class="paramname"><em>microenviron</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_canopy_class.html">VerticalCanopyClass</a> *&#160;</td>
          <td class="paramname"><em>vertcanopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_vertical_soil_class.html">VerticalSoilClass</a> *&#160;</td>
          <td class="paramname"><em>vertsoils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_eigen_canopy_class.html">EigenCanopyClass</a> *&#160;</td>
          <td class="paramname"><em>eigencanopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_eigen_soil_class.html">EigenSoilClass</a> *&#160;</td>
          <td class="paramname"><em>eigensoils</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_output_class.html">OutputClass</a> *&#160;</td>
          <td class="paramname"><em>outmlcan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>domsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int2&#160;</td>
          <td class="paramname"><em>topolsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int2&#160;</td>
          <td class="paramname"><em>topolindex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MPI_Comm *&#160;</td>
          <td class="paramname"><em>cartComm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a06ccda7e927aad51714c254e703c7342"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SaveModelResults </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timestep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy to host and save 2D and 3D results to netcdf. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland_host</td><td>Overland flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland_dev</td><td>Overland flow class in device memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_host</td><td>Subsurface flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_dev</td><td>Subsurface flow class in device memory </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timestep</td><td>Current time step </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a106808d5ba55a54cef12059a6af7f2cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SaveResultEntirePeriod </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_canopy_class.html">CanopyClass</a> *&#160;</td>
          <td class="paramname"><em>canopies</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&#160;</td>
          <td class="paramname"><em>subsurface_host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_output_class.html">OutputClass</a> *&#160;</td>
          <td class="paramname"><em>outmlcan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">MPI_Comm *&#160;</td>
          <td class="paramname"><em>cartComm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Save mean results for entire simulation period. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">canopies</td><td>Class including canopy variables </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface_host</td><td>Subsurface flow class in host memory </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">outmlcan</td><td>Class including output for MLCan model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">cartComm</td><td>The cartesian communications </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a01482c18a453883899e7979fc631d459"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetFlowModelConditions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_time_forcing_class.html">TimeForcingClass</a> *&#160;</td>
          <td class="paramname"><em>timeforcings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_file_name_class.html">FileNameClass</a> *&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_overland_flow_class.html">OverlandFlowClass</a> *&#160;</td>
          <td class="paramname"><em>overland</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>subsurface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_steps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set conditions in host memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">forcings</td><td>Class including forcings info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">overland</td><td>Overland flow class </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface</td><td>Subsurface flow class </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_steps</td><td>The number of timesteps </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>Global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">cartComm</td><td>Carthesian MPI communicator </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a98590f5891351f22d8c51d213bf483a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SetMPIGPUMapping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&#160;</td>
          <td class="paramname"><em>mpiobj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_subsurface_flow_class.html">SubsurfaceFlowClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>subsurface</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int3&#160;</td>
          <td class="paramname"><em>globsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int2&#160;</td>
          <td class="paramname"><em>topolsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the MPI map used for flow model in GPU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">subsurface</td><td>Subsurface flow class </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>Total number of MPI processes available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">globsize</td><td>Size of the global domain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">topolsize</td><td>Size of topology nodes (mpi) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad0565c33ed351121f9cbd7bf1ddfbec8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SetTopologyNetwork </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rank</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>procsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_project_class.html">ProjectClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>project</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmpi_class.html">mpiClass</a> *&amp;&#160;</td>
          <td class="paramname"><em>mpiobj</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set up topolgy network (domain decomposition) and obtained neighbors. The size of topology must be matched with the size of MPI processes used. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rank</td><td>The global rank of the current MPI process </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">procsize</td><td>The total number of MPI processes available </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">project</td><td>Class including project info </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">mpiobj</td><td>message passing interface object class</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>function status </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
